home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / bin / showpicture < prev    next >
Encoding:
Text File  |  1995-07-03  |  2.2 KB  |  77 lines

  1. :
  2. # Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
  3. # Permission to use, copy, modify, and distribute this material 
  4. # for any purpose and without fee is hereby granted, provided 
  5. # that the above copyright notice and this permission notice 
  6. # appear in all copies, and that the name of Bellcore not be 
  7. # used in advertising or publicity pertaining to this 
  8. # material without the specific, prior written permission 
  9. # of an authorized representative of Bellcore.  BELLCORE 
  10. # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
  11. # OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
  12. # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  13.  
  14. # Conversion from C shell to Bourne shell by Z-Code Software Corp.
  15. # Conversion Copyright (c) 1992 Z-Code Software Corp.
  16. # Permission to use, copy, modify, and distribute this material
  17. # for any purpose and without fee is hereby granted, provided
  18. # that the above copyright notice and this permission notice
  19. # appear in all copies, and that the name of Z-Code Software not
  20. # be used in advertising or publicity pertaining to this
  21. # material without the specific, prior written permission
  22. # of an authorized representative of Z-Code.  Z-CODE SOFTWARE
  23. # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
  24. # OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS",
  25. # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  26.  
  27. if [ -z "$METAMAIL_TMPDIR" ]
  28. then
  29.     METAMAIL_TMPDIR=/tmp
  30. fi
  31.  
  32. if test -z "${X_VIEWER:-}"
  33. then
  34.     X_VIEWER="xloadimage -view -quiet -geometry +1+1"
  35. # X_VIEWER="xv -geometry +1+1"
  36. fi
  37.  
  38. if test "$1" = "-viewer" -a ! -z "$2"
  39. then
  40.     X_VIEWER="$2"
  41.     shift
  42.     shift
  43. fi
  44.  
  45. if test -z "${DISPLAY:-}"
  46. then
  47.     echo ""
  48.     echo This message contains a picture, which can currently only be
  49.     echo viewed when running X11.  If you read this message while running
  50.     echo X11, you will be able to see the picture properly.
  51.     exit 0
  52. fi
  53.  
  54. echo NOTE: TO MAKE THE PICTURE WINDOW GO AWAY, JUST TYPE 'q' IN IT.
  55. echo ""
  56.  
  57. if test -z "$1"
  58. then
  59.     $X_VIEWER stdin
  60. else
  61.     for i
  62.     do
  63.         dir=`dirname $i`
  64.         base=`basename $i`
  65.         if test ! "$base" = "$i"
  66.         then
  67.             cd $dir
  68.         fi
  69.         if ln $i $$.PRESS-q-TO-EXIT  > /dev/null 2>&1
  70.         then $X_VIEWER $$.PRESS-q-TO-EXIT
  71.             rm $$.PRESS-q-TO-EXIT 
  72.         else $X_VIEWER "$i"
  73.         fi
  74.     done
  75. fi
  76.